<?php
include $this->Render('header.php');
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_STYLE;?>/css/admin.css" />
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/common.js"></script>

<div class="tongrong-box" style="width:680px;">
	<form class="login-box-form J-ajaxForm" action="/order/oeditaudit/option/auditsave/" method="post" autocomplete="off">
	<div class="tongrong-box-main">
    	<table width="100%" cellpadding="0" cellspacing="0" border="0">
        	<tr>
            	<td width="90px" height="30">审核结果：</td>
                <td>
                	<select name="up_status">
                    	<option value="通过">通过</option>
                        <option value="退回">不通过</option>
                    </select>
                </td>
            </tr>
            <tr>
            	<td height="70">审核备注：</td>
                <td>
                	<textarea name="up_remark" style="resize:none; width:455px;"></textarea>
                </td>
            </tr>
        </table>
    </div>
    <div class="luru-box-btn mt50">
		<input type="hidden" name="up_id" value="<?php echo $this->up_id;?>" />
		<?php if($this->data['up_type']=='资审' ||$this->data['up_type']=='电审') {echo '<a href="javascript:;" class="a-btn-close J-changetype fn-right mr15">';}?><?php if($this->data['up_type']=='资审') {$message = '转给电审';}elseif($this->data['up_type']=='电审'){$message = '转给资审';} echo $message; ?> <?php if($this->data['up_type']=='资审' ||$this->data['up_type']=='电审') {echo '</a>';}?>
    	<input class="btn-submit-blue fn-left mr15 J-submit" type="submit" value="提交" />
        <a class="a-btn-close J-a-btn-close" href="javascript:;">关闭</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </div>
	</form>
</div>

<script>
	//关闭弹出
	$(".J-a-btn-close").on('click',function(){
		var winElement = parent.Ext.fly(window.frameElement).up('div.x-window');
		parent.Ext.getCmp(winElement.id).close();
		
	});
	
	$(document).ready(function(e) {
		//全选
        $(".J-submit").on('click',function(){
			$(this).dyhlForm({
				beforefunction:function(){
					$(".J-submit").prop('disabled',true);
					Ext.getBody().mask("数据提交中，请稍等");
				},
				nofunction:function(){
					$(".J-submit").prop('disabled',false);
					Ext.getBody().unmask();
				},
				sucessfunction:function(data){
					$(".J-submit").prop('disabled',false);
					Ext.getBody().unmask();
					if(data['success']){
						if(data['url']){
							Ext.Msg.confirm('提示','提交成功！该订单修改申请已全部处理，是否去审核该订单?',function(btn){
								if(btn=='yes'){
									window.parent.location.href = data['url'];
								}else{
									window.parent.location.reload();
								}
							});
						}else {
							Ext.Msg.alert('提示', '提交成功', function () {
								window.parent.location.reload();
							});
						}
						
					}else{
						Ext.Msg.alert('提示',data['msg']);
					}
				}	
			});	
		});

	$(".J-changetype").on('click',function(){
		var up_id = $('input[name="up_id"]').val();
					
		Ext.Msg.confirm('提示','您确定进行此操作吗?',function(btn){
			if(btn=='yes'){
				$.post('/order/oeditaudit/option/changetype',{'up_id':up_id},function(data){
						Ext.Msg.alert('提示',data['msg']);		
				},'json');	
			}
		});
		
	});	


    });
	
</script>

<?php include $this->Render('footer.php'); ?>